package controllers

import (
	"read.com/admin/models"
)

type RatingamountController struct {
	BaseController
}

func (self *RatingamountController) List() {
	self.Data["pageTitle"] = "书籍评论数量"
	self.display()
}

func (self *RatingamountController) Table() {
	name := self.GetString("name")

	//列表参数
	page, err := self.GetInt("page")
	if err != nil {
		page = 1
	}
	limit, err := self.GetInt("limit")
	if err != nil {
		limit = 10
	}
	ratingList, total := models.GetAllBookRating(name,page,limit)
	self.ajaxList("成功", MSG_OK, total, ratingList)
}
